
<@override name="main-content">
<div class="ui sixteen wide column">
    <div class="ui basic segment">
        <h1>${topic.title}</h1>

        <div class="ui basic segment">
            <p style="font-size:1.1rem;text-indent: 2rem;">${topic.content!'无内容'}</p>
        </div>
        <div class="ui divider"></div>


        <div class="ui divided items">
            <#list replies as reply>
                <div class="item">
                    <div class="ui tiny image">
                        <img class="ui avatar image" src="/images/joe.jpg" alt="">
                    </div>
                    <div class="ui basic segment content" style="min-height: 50px;">

                        <p style="font-size:1.1rem;text-indent: 2rem;">${reply.content}</p>

                        <div class="right floated description" style="font-weight: bold">
                            --${reply.nickname} &nbsp;回复于&nbsp;${reply.pub_date}
                        </div>
                    </div>

                </div>
            </#list>

        </div>
        <#if (session.user)??>

            <form action="/topic/reply" method="post">
                <input type="hidden" name="user_id" value="${session.user.id}">
                <input type="hidden" name="topic_id" value="${topic.id}">
                内容: <textarea cols="70" rows="10" name="content"></textarea> <br>
                <input type="submit" value="回复">

            </form>
        <#else>
            <span style="color:red;">请<a href="/login">登录</a>后再回复</span>
        </#if>

    </div>
</div>


</@override>

<@extends name="../main-layout.ftl"></@extends>